/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.timesoft.base.ctrl;

import com.timesoft.zk.common.ctrl.MainPageWsController;
import org.apache.log4j.Logger;
import org.zkoss.zk.ui.Component;
import org.zkoss.zul.Include;

/**
 *
 * @author sorasaks
 */
public class MainCtrl extends MainPageWsController {

    private static final Logger LOG = Logger.getLogger(MainCtrl.class);
    
    private Include popupInc;
    private Include signinInc;
    private Include settingInc;
    private Include headerInc;
    private Include contentInc;
    private Include footerInc;

    public MainCtrl() throws Exception {
        super("home.label.app.title", Boolean.TRUE);
    }

    @Override
    public void doAfterCompose(Component comp) throws Exception {
        super.doAfterCompose(comp); //To change body of generated methods, choose Tools | Templates.
        initialIncludeComponent();

        LOG.debug("===== setAttribute ===");
    }
    
    @Override
    protected void initialIncludeComponent() {
        desktop.setAttribute(ATTRIBUTE_POPUP_INCLUDE, popupInc);
        desktop.setAttribute(ATTRIBUTE_SIGN_IN_INCLUDE, signinInc);
        desktop.setAttribute(ATTRIBUTE_SETTING_INCLUDE, settingInc);
        desktop.setAttribute(ATTRIBUTE_HEADER_INCLUDE, headerInc);
        desktop.setAttribute(ATTRIBUTE_CONTENT_INCLUDE, contentInc);
        desktop.setAttribute(ATTRIBUTE_FOOTER_INCLUDE, footerInc);
    }

}
